local anheitongling = fk.CreateSkill {
  name = "anheitongling",
  tags = { Skill.Compulsory },
}

Fk:loadTranslationTable{
  ["anheitongling"] = "通灵·暗黑",
  [":anheitongling"] = "持恒技，一名角色的回合结束后，如果你的通灵点大于15点，消耗所有的通灵点进行通灵。首次通灵时获得技能【梦想传递】，额外增加一点生命值上限。",

}

anheitongling:addEffect(fk.TurnEnd, {
  can_trigger = function(self, event, target, player, data)
    return player:hasSkill(anheitongling.name) and
        player:getMark("@tonglingdian") > 14
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local n = 0
    player:gainAnExtraTurn()
    if n==0 then
    room:changeMaxHp(player, 1)
    room:handleAddLoseSkills(player, "mengxiangchuandi")
    end
    n=n + 1
    room:setPlayerMark(player, "@tonglingdian", 0)
  end,
})

return anheitongling